package com.alan.dfs.msg;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 分页数据对象
 *
 * @author shixing
 */
@Data
@ApiModel(value = "PageData", description = "分页数据对象")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PageData<T> implements Serializable {

    @ApiModelProperty("总记录数")
    private long total;
    @ApiModelProperty("结果集")
    private List<T> rows;

    public PageData(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }
}
